import Vue from 'vue'
import App from './App'
import router from './router'
import vueWechatTitle from 'vue-wechat-title'
// import $ from 'jquery'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'



Vue.use(vueWechatTitle)
// 图片懒加载
import VueLazyload from 'vue-lazyload';

// import './plugins/element.js'
Vue.use(VueLazyload, {
    preLoad: 1.3,
    attempt: 1, // 加载图片数量
    listenEvents: ['scroll', 'click']
});

import store from '@/store/';
// import './assets/css/common/iconfont/iconfont.js';
// import './assets/css/common/iconfont/iconfont.css';
import 'babel-polyfill';
import './assets/css/common/base.scss';

import promise from 'es6-promise';
promise.polyfill();

import commonJS from './utils/common.js';
Vue.prototype.$commonJS = commonJS

import axiosHttp from './utils/ajax/axiosHttp.js';
Vue.prototype.$axiosHttp = axiosHttp

import urls from './utils/goUrl.js';
Vue.prototype.$urls = urls

import utils from './utils/utils.js';
Vue.prototype.$utils = utils

import httpConfig from './utils/httpConfig.js';
Vue.prototype.$httpConfig = httpConfig;
// vue全屏滚动使用
import VueFullpage from './utils/VueFullpage.js'
Vue.use(VueFullpage)

import watermark from './utils/watermark.js';
Vue.prototype.$watermark = watermark

// 引入连接截取
import splitUrl from './utils/splitUrl.js';
Vue.prototype.$splitUrl = splitUrl;





// 引入echart4,不想改了，这里用 echarts了，不用echarts4了
import echarts4 from '../static/js/echarts.min.js'
Vue.prototype.$echarts4  = echarts4
console.log(echarts4,'echarts...')

// 引入echarts5，
import  * as echarts5 from 'echarts/core';
Vue.prototype.$echarts5 = echarts5
console.log(echarts5,'echarts5...')
//mui 按需加载
import {
    TabContainer,
    TabContainerItem,
    Spinner,
    Loadmore,
    Picker,
    Field,
    Button,
    Swipe,
    SwipeItem,
    Popup
} from 'mint-ui';
Vue.component(TabContainer.name, TabContainer);
Vue.component(TabContainerItem.name, TabContainerItem);
Vue.component(Spinner.name, Spinner);
Vue.component(Loadmore.name, Loadmore);
Vue.component(Picker.name, Picker);
Vue.component(Field.name, Field);
Vue.component(Button.name, Button);
Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);
Vue.component(Popup.name, Popup);

  Vue.use(ElementUI)
 import 'element-ui/lib/theme-chalk/index.css'

// Vue.use(Element)
const VConsole = require("vconsole");
new VConsole();

/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    store,
    template: '<App/>',
    components: {
        App
    }
})
